Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
getRunDialog().open();
});
-
- Meta.keybindings_set_custom_handler('panel-main-menu', function () {
- overview.toggle();
- });
-
- global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
-
}
function start() {
layoutManager = new Layout.LayoutManager();
xdndHandler = new XdndHandler.XdndHandler();
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
- // This overview object is just a stub for non-user sessions
- overview = new Overview.Overview({ isDummy: sessionMode.sessionType != Shell.SessionType.USER });
+ overview = new Overview.Overview();
magnifier = new Magnifier.Magnifier();
statusIconDispatcher = new StatusIconDispatcher.StatusIconDispatcher();
panel = new Panel.Panel();
if (sessionMode.sessionType == Shell.SessionType.USER)
_initUserSession();
+
+ if (sessionMode.hasOverview) {
+ Meta.keybindings_set_custom_handler('panel-main-menu', function () {
+ overview.toggle();
+ });
+
+ global.display.connect('overlay-key',
+ Lang.bind(overview, overview.toggle));
+ }
+
statusIconDispatcher.start(messageTray.actor);
// Provide the bus object for gnome-session to
const Overview = new Lang.Class({
Name: 'Overview',
- _init : function(params) {
- params = Params.parse(params, { isDummy: false });
-
- this.isDummy = params.isDummy;
+ _init : function() {
+ this.isDummy = !Main.sessionMode.hasOverview;
// We only have an overview in user sessions, so
// create a dummy overview in other cases
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
/* Button on the left side of the panel. */
- if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
+ if (Main.sessionMode.hasOverview) {
this._activitiesButton = new ActivitiesButton();
this._activities = this._activitiesButton.actor;
this._leftBox.add(this._activities);
// The activities button has a pretend menu, so as to integrate
// more cleanly with the rest of the panel
this._menus.addMenu(this._activitiesButton.menu);
+ }
+ if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
this._appMenu = new AppMenuButton(this._menus);
this._leftBox.add(this._appMenu.actor);
}
const DEFAULT_MODE = 'user';
const _modes = {
- 'gdm': { sessionType: Shell.SessionType.GDM },
+ 'gdm': { hasOverview: false,
+ sessionType: Shell.SessionType.GDM },
- 'user': { sessionType: Shell.SessionType.USER }
+ 'user': { hasOverview: true,
+ sessionType: Shell.SessionType.USER }
};
function modeExists(mode) {